
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
	"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
	<meta http-equiv="content-type" content="text/html; charset=utf-8">
	<title>JsDoc: TopicSubscriber</title>
	<style type="text/css">
		body { background-color: #FFFFFF; }
		.TableHeadingColor { background: #CCCCFF; }
		.TableSubHeadingColor { background: #EEEEFF; }
		.TableRowColor { background: #FFFFFF; }
		
		.FrameTitleFont
		{
			font-size: 10pts;
			font-family: Helvetica, Arial, san-serif;
		}
		
		.FrameHeadingFont
		{
			font-size: 10pts;
			font-family: Helvetica, Arial, san-serif;
		}
		
		.FrameItemFont
		{
			font-size: 10pts;
			font-family: Helvetica, Arial, san-serif;
		}
		
		.NavBar
		{
			font-family: Arial, Helvetica, sans-serif;
			background-color: #FFFFFF;
		}
		
		.jsdoc_ctime
		{
			font-family: Arial, Helvetica, sans-serif;
			font-size: 9pt;
			text-align: right;
		}
	</style>
</head>

<body>

<table style="width: 100%">
<tr>
<td class="NavBar" valign="top"><font size="-2">SUMMARY:&nbsp;<a href="#field_summary">FIELD</a>&nbsp;|&nbsp;<a href="#constructor_summary">CONSTR</a>&nbsp;|&nbsp;<a href="#method_summary">METHOD</a></font></td>
<td class="NavBar" valign="top"><font size="-2">DETAIL:&nbsp;<a href="#field_detail">FIELD</a>&nbsp;|&nbsp;<a href="#constructor_detail">CONSTR</a>&nbsp;|&nbsp;<a href="#method_detail">METHOD</a></font></td>
</tr>
</table>

<hr>

<h2>Class TopicSubscriber</h2>



<p>
A client uses a <CODE>TopicSubscriber</CODE> object to receive messages thathave been published to a topic. A <CODE>TopicSubscriber</CODE> object is thepublish/subscribe form of a message consumer. A <CODE>MessageConsumer</CODE>can be created by using <CODE>Session.createConsumer</CODE>. <P>A <CODE>TopicSession</CODE> allows the creation of multiple <CODE>TopicSubscriber</CODE> objects per topic.  It will deliver each message for a topic to eachsubscriber eligible to receive it. Each copy of the messageis treated as a completely separate message. Work done on one copy hasno effect on the others; acknowledging one does not acknowledge theothers; one message may be delivered immediately, while another waitsfor its subscriber to process messages ahead of it.<P>Regular <CODE>TopicSubscriber</CODE> objects are not durable. They receive only messages that are published while they are active.<P>If a client needs to receive all the messages published on a topic, including the ones published while the subscriber is inactive, it uses a durable <CODE>TopicSubscriber</CODE>. The JMS provider retains a record ofthis durable subscription and insures that all messages from the topic's publishers are retained until they are acknowledged by this durable subscriber or they have expired.<P>Sessions with durable subscribers must always provide the same client identifier. In addition, each client must specify a name that uniquely identifies (within client identifier) each durable subscription it creates.Only one session at a time can have a <CODE>TopicSubscriber</CODE> for a particular durable subscription. <P>A client can change an existing durable subscription by creating a durable <CODE>TopicSubscriber</CODE> with the same name and a new topic and/or message selector. Changing a durable subscription is equivalent to unsubscribing (deleting) the old one and creating a new one.<P>The <CODE>unsubscribe</CODE> method is used to delete a durable subscription. The <CODE>unsubscribe</CODE> method can be used at the <CODE>Session</CODE> or <CODE>TopicSession</CODE> level.This method deletes the state being maintained on behalf of the subscriber by its provider.<P>Creating a <CODE>MessageConsumer</CODE> provides the same features ascreating a <CODE>TopicSubscriber</CODE>. To create a durable subscriber, use of <CODE>Session.CreateDurableSubscriber</CODE> is recommended. The <CODE>TopicSubscriber</CODE> is provided to support existing code.</p>




<hr>

<!-- =========== FIELD SUMMARY =========== -->

<!-- =========== END FIELD SUMMARY =========== -->


<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<a name="constructor_summary"> </a>
<table border="1" cellpadding="3" cellspacing="0" width="100%">
<tr bgcolor="#CCCCFF" class="TableHeadingColor">
	<td colspan=2><font size="+2"><b>Constructor Summary</b></font></td>
</tr>

	<tr bgcolor="white" class="TableRowColor">
	   <td>
	
		<code>
		<b><a href="#TopicSubscriber">TopicSubscriber</a></b>()
		</code>
		  <br>
		  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
		  
A client uses a <CODE>TopicSubscriber</CODE> object to receive messages thathave been published to a topic.
		  </td>
	</tr>

</table>
&nbsp;
<!-- ======== END CONSTRUCTOR SUMMARY ======== -->


<!-- ========== METHOD SUMMARY =========== -->

<!-- ========== EVENT SUMMARY =========== -->



<!-- ========== INHERITED METHODS SUMMARY =========== -->

<br/>

<!-- ========== END INHERITED METHODS SUMMARY =========== -->

<!-- ============ FIELD DETAIL START ========= -->

<!-- ============ FIELD DETAIL END ========== -->


<!-- ========= CONSTRUCTOR DETAIL START ======== -->
<a name="constructor_detail"> </a>
<table border="1" cellpadding="3" cellspacing="0" width="100%">
   <tr bgcolor="#CCCCFF" class="TableHeadingColor">
      <td colspan=1>
      <font size="+2"><b>Constructor Detail</b></font>
      </td>
   </tr>

</table>

<a name="TopicSubscriber"> </a>
<h3>TopicSubscriber</h3>

	<pre><b>TopicSubscriber</b>()</pre>
	<ul>
	   
A client uses a <CODE>TopicSubscriber</CODE> object to receive messages thathave been published to a topic. A <CODE>TopicSubscriber</CODE> object is thepublish/subscribe form of a message consumer. A <CODE>MessageConsumer</CODE>can be created by using <CODE>Session.createConsumer</CODE>. <P>A <CODE>TopicSession</CODE> allows the creation of multiple <CODE>TopicSubscriber</CODE> objects per topic.  It will deliver each message for a topic to eachsubscriber eligible to receive it. Each copy of the messageis treated as a completely separate message. Work done on one copy hasno effect on the others; acknowledging one does not acknowledge theothers; one message may be delivered immediately, while another waitsfor its subscriber to process messages ahead of it.<P>Regular <CODE>TopicSubscriber</CODE> objects are not durable. They receive only messages that are published while they are active.<P>If a client needs to receive all the messages published on a topic, including the ones published while the subscriber is inactive, it uses a durable <CODE>TopicSubscriber</CODE>. The JMS provider retains a record ofthis durable subscription and insures that all messages from the topic's publishers are retained until they are acknowledged by this durable subscriber or they have expired.<P>Sessions with durable subscribers must always provide the same client identifier. In addition, each client must specify a name that uniquely identifies (within client identifier) each durable subscription it creates.Only one session at a time can have a <CODE>TopicSubscriber</CODE> for a particular durable subscription. <P>A client can change an existing durable subscription by creating a durable <CODE>TopicSubscriber</CODE> with the same name and a new topic and/or message selector. Changing a durable subscription is equivalent to unsubscribing (deleting) the old one and creating a new one.<P>The <CODE>unsubscribe</CODE> method is used to delete a durable subscription. The <CODE>unsubscribe</CODE> method can be used at the <CODE>Session</CODE> or <CODE>TopicSession</CODE> level.This method deletes the state being maintained on behalf of the subscriber by its provider.<P>Creating a <CODE>MessageConsumer</CODE> provides the same features ascreating a <CODE>TopicSubscriber</CODE>. To create a durable subscriber, use of <CODE>Session.CreateDurableSubscriber</CODE> is recommended. The <CODE>TopicSubscriber</CODE> is provided to support existing code.
	</ul>
	
	<!-- PARAMETERS START -->
	
	<!-- PARAMETERS END -->

<hr/>
<!-- END ADDITIONAL ATTRIBUTES  -->
<!-- ========= CONSTRUCTOR DETAIL END ======== -->


<!-- ============ METHOD DETAIL START ======= -->

<!-- ============ METHOD DETAIL END ========== -->



<!-- ============ EVENT DETAIL START ======= -->



<!-- ============ EVENT DETAIL END ========== -->
<div class="jsdoc_ctime">Documentation generated by <a href="http://jsdoctoolkit.org/" target="_parent">JsDoc Toolkit</a> 1.3.3 on Tue Aug 23 2011 02:47:05 GMT-0700 (PDT)</div>
</body>
</html>